import request from 'utils/request'

// 申请技师
export function AddOrEditArtificer(model) {
  return request({
    url: '/Artificer/AddOrEditArtificer',
    method: 'post',
		data: {
      name: model.name.value, // 姓名
      tel: model.tel.value, // 手机号
      identityNumber: model.identityNumber.value, // 身份证
      sex: model.sex.value, // 性别
      selfIntroduce: model.selfIntroduce.value, // 简介
      serviceProject: model.serviceProject.value, // 可服务项目
			identCardImages: model.identCardImages.value.join(','), // 身份证正反面
      photo: model.photo.value.join(','), // 本人近期照
      certificates: model.certificates.value.join(','), // 资质证书
			invitStoreId: model.invitStoreId
    }
  })
}

// 获取技师列表
export function GetArtificerPage(data) {
	return request({
    url: '/Artificer/GetArtificerPage',
    method: 'post',
		data: data
  })
}
//获取技师信息
export function GetArtificerInfo(params) {
	return request({
    url: '/Artificer/GetArtificerInfo',
    method: 'get',
		params: params
  })
}
//获取技师服务项目分页
export function GetArtificerProductPage(data) {
	return request({
    url: '/Artificer/GetArtificerProductPage',
    method: 'post',
		data: data
  })
}
//收藏技师/取消收藏技师
export function AddArtificerToFavorite(data) {
	return request({
    url: '/Artificer/AddArtificerToFavorite',
    method: 'post',
		data: data
  })
}
//获取技师工作时间信息
export function GetArtificerWorkTimeInfo() {
	return request({
    url: '/Artificer/GetArtificerWorkTimeInfo',
    method: 'get',
  })
}
//修改技师工作时间信息
export function SubmitArtificerWorkTime(data) {
	return request({
    url: '/Artificer/SubmitArtificerWorkTime',
    method: 'post',
		data: data
  })
}
//获取技师首页信息(技师端 我的)
export function GetArtificerPerformance() {
	return request({
    url: '/Artificer/GetArtificerPerformance',
    method: 'get',
  })
}
//获取是否开启技师无码核销
export function GetCanArtificerWriteOff() {
	return request({
    url: '/Artificer/GetCanArtificerWriteOff',
    method: 'get',
  })
}

//修改技师在线状态
export function SubmitArtificerLineState(params) {
	return request({
    url: '/Artificer/SubmitArtificerLineState',
    method: 'get',
		params: params
  })
}
//修改技师经纬度
export function SubmitArtificerLngLat(data) {
  return request({
    url: '/Artificer/SubmitArtificerLngLat',
    method: 'post',
		data: data
  })
}
//获取路费计算方式
export function GetArtificerTripCostType() {
	return request({
    url: '/Artificer/GetArtificerTripCostType',
    method: 'get',
  })
}

//确认技师开始服务
export function BookHomeOrderConfirmStartService(data) {
  return request({
    url: '/Order/BookHomeOrderConfirmStartService',
    method: 'post',
		data: data
  })
}
// 获取订单列表(用户)
export function GetBookHomeOrderPage(data) {
  return request({
    url: '/Order/GetBookHomeOrderPage',
    method: 'post',
		data: data
  })
}

//获取预约上门下单配置(下单须知,出行费用说明)
export function GetBookHomeSettingInfo(params) {
  return request({
    url: '/Order/GetBookHomeSettingInfo',
    method: 'get',
		params:params
  })
}
//获取预约上门下单出行费用
export function CalculateBookHomeOrderTripCost(data) {
  return request({
    url: '/Order/CalculateBookHomeOrderTripCost',
    method: 'post',
		data: data
  })
}
//获取预约上门可下单时间范围
export function GetCanBookHomeTimes(data) {
  return request({
    url: '/Order/GetCanBookHomeTimes',
    method: 'post',
		data: data
  })
}
//下预约上门订单
export function SubmitBookHomeOrder(data) {
  return request({
    url: '/Order/SubmitBookHomeOrder',
    method: 'post',
		data: data
  })
}
//下预约上门加钟订单
export function SubmitAddBookHomeOrder(data) {
  return request({
    url: '/Order/SubmitAddBookHomeOrder',
    method: 'post',
		data: data
  })
}

//提交预约上门订单评价
export function AddBookHomeOrderComment(data) {
  return request({
    url: '/Order/AddBookHomeOrderComment',
    method: 'post',
		data: data
  })
}
//预约上门评价列表
export function GetBookHomeOrderCommentPage(data) {
  return request({
    url: '/Order/GetBookHomeOrderCommentPage',
    method: 'post',
		data: data
  })
}

//技师确认出发
export function BookHomeOrderConfirmGo(params) {
  return request({
    url: '/Order/BookHomeOrderConfirmGo',
    method: 'get',
		params:params
  })
}
//技师确认到达
export function BookHomeOrderConfirmArrived(data) {
  return request({
    url: '/Order/BookHomeOrderConfirmArrived',
    method: 'post',
		data: data
  })
}
//获取预约上门订单信息
export function GetBookHomeOrderInfo(params) {
  return request({
    url: '/Order/GetBookHomeOrderInfo',
    method: 'get',
		params: params
  })
}
//获取订单核销码
export function GetOrderWriteoffCodeList(params) {
  return request({
    url: '/Order/GetOrderWriteoffCodeList',
    method: 'get',
		params: params
  })
}
